package com.lgx.common.web.util;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 *  util for set list
 * @author pengdeyi (king)
 *
 */
public class ListConvertToSet {
	
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public static Set<?> convertToSet(List<?> list){
		Set<?> set = null;
		if(list!=null){
			set = new HashSet(list);
		}
		return set;
	}
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public static List<?> convertToList(Set<?> set){
		List<?> list = null;
		if(set!=null){
			list = new ArrayList(set);
		}
		return list;
	}
}
